:Init
@setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
@pushd %~dp0
@prompt $_
@echo off

if "%1" == "" goto Usage
if "%2" == "" goto Usage
if "%3" == "" goto Usage
goto :CreateUser

:Usage
@echo.
@echo Creates an new user account and assigns local group memebership.  
@echo.
@echo USER.CREATE <username> <password> <group>
@echo.
@echo   username    Username for the new user account.
@echo   password    Password for the new user account.
@echo   group       Local group to assign user account.
@echo.
goto :eof

:CreateUser
net user %1 %2 /add
net localgroup %3 %1 /add
@goto :End

:End
@echo.
@echo Completed.
@echo.
goto :eof
